package com.forekonw.demo4;


import java.util.Scanner;

/**
 * 用方法求 最大值得下标
 */
public class TestMethodtest {
    public static int max(int[] array){
        int maxxia = 0;
        for (int i =1 ;i<array.length;i++){
            if (array[maxxia]<array[i]){
                maxxia = i;
            }
        }
        return maxxia;
    }
    public static void main(String[] args) {
        int[] arr ={1,2,34,54,23,2,4345,67,3};
        int max = TestMethodtest.max(arr);
        System.out.println(max);
    }















}
